import request from "@/utils/request";

// 分页
export function pageData(params){
    return request({
        url:'/tGroupRest/page',
        method:'get',
        params
    })
}

export function create(data){
    return request({
        url:'/tGroupRest/create',
        method:'post',
        data
    })
}


export function update(data){
    return request({
        url:'/tGroupRest/update',
        method:'put',
        data
    })
}


export function removeById(id){
    return request({
      url: `/tGroupRest/remove?id=${id}`,
      method: 'delete',
    })
}

export function loadGroupRole(groupId){
  return request({
    url:'/tGroupRest/groupRoles',
    params:{
      groupId
    }
  })
}

export function bindRoles(data){
  return request({
    url:"/tGroupRest/bindRoles",
    method:'put',
    data
  })
}

export function allGroup(params){
  return request({
    url:'/tGroupRest/allGroup',
    params
  })
}
